The present invention relates in general to computer systems employing a common serial data bus to provide communication links between a host computer and more than one peripheral device and particularly to a method and apparatus for dynamically assigning addresses to each peripheral device on the bus.
When more than one peripheral device, such as a keyboard, joystick or digitizer must communicate with a host computer through a common serial data bus, the computer must be able to tell which peripheral device has sent any particular data received by the computer over the bus. Also when the computer sends data to some peripheral device on the bus, the selected device must know that the data is intended for it. All other peripheral devices must know that the data should be ignored. In the prior art it is common to establish a data transmission protocal whereby all data transmissions to or from peripheral devices contain peripheral addressing information, usually at the beginning of the transmission. Each peripheral device is assigned a unique address and incorporates that address into every data transmission to the computer. Likewise the computer incorporates the unique address of the selected peripheral device in every transmission to each peripheral. Each peripheral device is designed to respond to data transmissions containing only its unique address code and to ignore others.
In the prior art, the unique address of each peripheral device is typically established through adjustment of hardware in the device such as, for instance, through setting switches or through data stored in a read only memory (ROM) contained in each device. A communication controller in each peripheral device is then programmed to respond only to messages containing addresses matching the number stored in ROM or set by the switches. One disadvantage of using a ROM in each peripheral device is that the ROM must be different for each device. If, for instance, two keyboards are connected to the same bus, the ROM in one keyboard must be altered.
Use of switches in each peripheral device makes it easier for a user to give each device a unique address. However a large number of switches must be used if the address uses several bits to accommodate a large number of peripheral devices. Requiring a user to set a large number of switches accurately presents an opportunity for human error.
It would be advantageous if peripheral devices could be added to a serial bus without the need for changing ROMs in any peripheral device or without the need for setting the entire device address in switches in the peripheral devices.